package com.gzhryc.jdbc.log;

import com.gzhryc.jdbc.models.Parameters;
import org.apache.log4j.LogManager;

public abstract class Logger {

	public abstract void sql(String jdbcKey,String message,Parameters parameters);

	public abstract void sql(String jdbcKey,String message);

	public abstract void info(String message, Object... strings);

	public abstract void error(String message, Object... strings);

	public abstract void debug(String message, Object... strings);

	public static Logger getLogger(Class<?> clazz) {
		DefaultLogger logger = null;
		try {
			Class.forName("org.apache.log4j.LogManager");
			logger = new DefaultLogger(LogManager.getLogger(clazz.getName()));
		} catch (Exception e) {
			logger = new DefaultLogger(null);
		}
		return logger;
	}

}
